//
//  Service+OrderService.h
//  CarService
//
//  Created by fengyn on 15/4/15.
//  Copyright (c) 2015年 lexingsoft. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ServiceManager.h"

///支付方式-支付宝
static NSString *kPayChannelAlipay=@"alipay";
///支付方式-微信支付
static NSString *kPayChannelWX=@"wx";
///支付方式-余额支付
static NSString *kPayChannelYE=@"virtual";
///支付方式-会员卡支付
static NSString *kPayChannelVipCard=@"VIP_CARD";

///配送方式-自提
static NSString *kTransportPicked=@"ABHOLUNG";
///配送方式-快递
static NSString *kTransportExpress=@"EXPRESS";

///订单状态-待付款
static NSString *kOrderStatusWaitPay=@"WAIT_FOR_PAY,WAITING_FOR_SETTLEMENT";
///订单状态-待服务@"TO_BE_CONFIRM,STAY_SERVICE,WAITING_FOR_SETTLEMENT";
static NSString *kOrderStatusWaitReceived=@"TO_BE_CONFIRM,STAY_SERVICE";
///订单状态-待评价
static NSString *kOrderStatusWaitReview=@"ARCHIVED";
///订单状态-售后维权
//static NSString *kOrderStatusWaitBackService=@"APPLYING,PROCESSING";

///售后类型-换货
static NSString *kAfterServiceTypeChange=@"change";
///售后类型-退货
static NSString *kAfterServiceTypeBack=@"back";

///科目一
static NSString *kSubjectTypeFirst=@"subject1";
///科目二
static NSString *kSubjectTypeSecond=@"subject2";
///科目三
static NSString *kSubjectTypeThird=@"subject3";
///科目四
static NSString *kSubjectTypeFourth=@"subject4";

///银行卡
static NSString *kBankCardWithdrawal=@"bankCard";
///支付宝
static NSString *kPayTreasureWithdrawal=@"payTreasure";

@interface ServiceManager(OrderService)

///重新支付定单
+ (void)repayOrderWithOrderSn:(NSString *)orderSn
                    payMethod:(NSString *)payMethod
                     password:(NSString *)password
                isIntelligent:(BOOL)isIntelligent
                      success:(void(^)(NSDictionary *data)) success
                      failure:(void(^)(NSDictionary *data)) failure;

///提交订单
+ (void)createOrderWithProductType:(NSString *)productType
                            amount:(NSString *)amount
                         payMethod:(NSString *)payMethod
                          products:(NSDictionary *)products
                          password:(NSString *)password
                     phoneLocation:(NSString *)phoneLocation
                       phoneNumber:(NSString *)phoneNumber
                       submitToken:(NSString *)submitToken
                             score:(NSString *)score
                          couponNo:(NSString *)couponNo
                           success:(void(^)(NSDictionary *data)) success
                           failure:(void(^)(NSDictionary *data)) failure;

///根据订单支付状态查询订单列表
+ (void)getAllOrdersWithPayStatus:(BOOL)isPay productType:(NSString *)productType pageIndex:(NSUInteger)pageIndex success:(void(^)(NSDictionary *data)) success failure:(void(^)(NSDictionary *data)) failure;

///创建约考单
+ (void)createReservationWithSubject:(NSString *)subject success:(void(^)(NSDictionary *data)) success failure:(void(^)(NSDictionary *data)) failure;

///获取预约时间段
+ (void)getScheduleTemplateSuccess:(void(^)(NSDictionary *data)) success failure:(void(^)(NSDictionary *data)) failure;

///提交预约练车单
+ (void)createLearningDriveOrderWithStringDateDic:(NSDictionary *)dateDiction subject:(NSString *)subject itemIndex:(NSUInteger)itemIndex regionCode:(NSString *)regionCode address:(NSString *)address success:(void(^)(NSDictionary *data)) success failure:(void(^)(NSDictionary *data)) failure;

///科目二子项目数组
+ (NSArray *)getSubjectSecondItems;

///根据订单号查询订单详情
+ (void)getOrderDetailWithProducts:(NSString *)orderSn success:(void(^)(NSDictionary *data)) success failure:(void(^)(NSDictionary *data)) failure;

///查询所有订单
+ (void)getAllOrderWithProducts:(NSString *)orderStatus pageIndex:(NSUInteger)pageIndex success:(void(^)(NSDictionary *data)) success failure:(void(^)(NSDictionary *data)) failure;

///支付完成回调
+ (void)payFinishWithChargeId:(NSString *)chargeId success:(void(^)(NSDictionary *data)) success failure:(void(^)(NSDictionary *data)) failure;

///报名支付
+ (void)paySignUpWithName:(NSString *)name amount:(NSNumber *)amount idCard:(NSString *)idCard payChannel:(NSString *)payChannel local:(NSString*)local orangeKey:(NSString*)orangeKey uccess:(void(^)(NSDictionary *data)) success failure:(void(^)(NSDictionary *data)) failure;
///购买保险
+ (void)payInsuranceWithAmount:(NSString *)amount payChannel:(NSString *)payChannel email:(NSString *)email uccess:(void(^)(NSDictionary *data)) success failure:(void(^)(NSDictionary *data)) failure;

///查询约车订单
+ (void)getOrderTrainingCar:(NSString *)workId pageIndex:(NSUInteger)pageIndex orderType:(NSString *)orderType success:(void(^)(NSDictionary *data)) success failure:(void(^)(NSDictionary *data)) failure;

///取消预约练车单
+ (void)cancelOrderTrainingCar:(NSString *)orderSn success:(void(^)(NSDictionary *data)) success failure:(void(^)(NSDictionary *data)) failure;

///评价订单
+ (void)postCreateComment:(NSString *)NBR commentBody:(NSString *)commentBody orderSn:(NSString *)orderSn starScore:(NSString *)starScore success:(void(^)(NSDictionary * data)) success failure:(void(^)()) failure;
///根据订单号获取订单详情 
+ (void)getOrderInfoWithOrderSn:(NSString *)orderSn success:(void(^)(NSDictionary *data)) success failure:(void(^)(NSDictionary *data)) failure;

///按天查预约单 \param date yyyy-MM-dd
+ (void)getOrdersWithDate:(NSString *)date success:(void (^)(NSDictionary *))success failure:(void (^)(NSDictionary *))failure;

///教练端根据订单获取详情
+ (void)getCocahOrderInfoWithOrderSn:(NSString *)orderSn success:(void(^)(NSDictionary *data)) success failure:(void(^)(NSDictionary *data)) failure;

///根据订单号查询收益情况
+ (void)getOrderSnFinancialBenefitsWithPageIndex:(NSInteger)pageIndex orderSn:(NSString*)orderSn success:(void(^)(NSDictionary *data)) success failure:(void(^)(NSDictionary *data)) failure;

///根据订单查询理财流量使用详情
+ (void)OrderSnUseFinancialBenefitsWithOrderSn:(NSString*)orderSn success:(void(^)(NSDictionary *data)) success failure:(void(^)(NSDictionary *data)) failure;

///根据订单号回购理财流量
+ (void)orderSnBuyBackFinancialBenefitsWithOrderSn:(NSString*)orderSn success:(void(^)(NSDictionary *data)) success failure:(void(^)(NSDictionary *data)) failure;
@end
